feat: add prost-reflect support - #131
Merged
siennathesane merged 4 commits intoDec 15, 2025
Merged
Conversation
YangchenYe323
requested review from
neoeinstein and
siennathesane
as code owners
December 9, 2025 22:49
YangchenYe323
marked this pull request as draft
December 10, 2025 15:08
YangchenYe323
marked this pull request as ready for review
December 10, 2025 17:08
Collaborator
|
I'm open to it, but please add it to the documentation so that it's obvious to other users as well. |
YangchenYe323
commented
Dec 12, 2025
YangchenYe323
left a comment
Contributor
Author
There was a problem hiding this comment.
@siennathesane Addressed your comment. The cargo fmt CI is fixed. The vet dependency one is still failing, but doesn't seem to be related to this PR
Comment on lines
+60
to
+64
| * `prost_reflect`: When specified together with `file_descriptor_set`, generate | ||
| implementations of [prost_reflect::ReflectMessage](https://docs.rs/prost-reflect/latest/prost_reflect/trait.ReflectMessage.html) trait for the generated rust struct. Note that this option | ||
| depends on `file_descriptor_set`, and when enabled, the generated `FileDescriptorSet` | ||
| *will* include all the dependent protobuf files in addition to the module being generated, | ||
| which required for prost_reflect descriptor to work. |
Contributor
Author
There was a problem hiding this comment.
Added documentation here. Let me know if there's other places I need to update
Collaborator
There was a problem hiding this comment.
Nope, this is good!
siennathesane
approved these changes
Dec 15, 2025
Comment on lines
+60
to
+64
| * `prost_reflect`: When specified together with `file_descriptor_set`, generate | ||
| implementations of [prost_reflect::ReflectMessage](https://docs.rs/prost-reflect/latest/prost_reflect/trait.ReflectMessage.html) trait for the generated rust struct. Note that this option | ||
| depends on `file_descriptor_set`, and when enabled, the generated `FileDescriptorSet` | ||
| *will* include all the dependent protobuf files in addition to the module being generated, | ||
| which required for prost_reflect descriptor to work. |
Collaborator
There was a problem hiding this comment.
Nope, this is good!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there, I added support of generating prost_reflect trait implementations to
protoc-gen-prost. It is controlled by optionprost_reflect, which depends onfile_descriptor_set, and the behavior change is:FileDescriptorSetGeneratorwill generate all the dependencies in addition to the original proto file, as prost-reflectDescriptorPoolrequires all the proto files are present in the set.I've tested and it's working with my protobuf project with
prost-reflect: 0.16.1Happy to update the doc and example if this is released